<!doctype html>
<title>For loop</title>

<script>

//Create an empty array
var closet = [];

//Add three things
closet[0] = "hat";
closet[1] = "umbrella";
closet[2] = "katana";

//View the entire array contents 
console.log("Entire array: " + closet);

//View individual elements
console.log("Element 0: " + closet[0]); 
console.log("Element 1: " + closet[1]); 
console.log("Element 2: " + closet[2]); 

</script>